package com.dd.model;

import cn.hutool.core.util.StrUtil;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class ConnectionInfo {
    private String name;
    private String url;
    private String username;
    private String password;
    private String server;

    public ConnectionInfo(String name, String username, String password, String server) {
        this.url = StrUtil.format("jdbc:mysql://{}/", server);
        this.name = name;
        this.server = server;
        this.username = username;
        this.password = password;
    }
}
